package com.fanrenqiji.common.service;

import com.fanrenqiji.common.search.Searchable;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created by yanwt on 2017/3/3.
 */
public interface IBaseService<V> {
    V saveOrUpdate(V v);

    void delete(String id);

    void delete(String[] ids);

    V findOne(String id);

    boolean exists(String id);

    long count(final Searchable searchable);

    List<V> findAllWithNoPageNoSort(Searchable searchable);

    List<V> findAllWithNoPage(Searchable searchable);

    Page<V> searchAll(Searchable searchable);
}
